<template>
	<div class="main">
		<div>
			<img src="@/assets/images/wechat/student/loading/loading.jpg">
			<div class="skip" @click="submit">
				{{times}}s&nbsp跳过
			</div>
		</div>
	</div>
</template>

<script>
	import router from '@/router/index'
	export default {
		components: {
			
		},
		data() {
			return {
				timmer: null,
				times:3
			}
		},
		created:async function() {
			
		},
		beforeMount: function() {
	
		},
		mounted: function() {
			var that=this
			this.timmer = setInterval(function(){
				that.times=that.times-1
				if(that.times==0){
					router.replace({path:"/wechatstudent/stucenter"});
				}
			},1000)
		},
		methods: {
			submit:function(){
				clearInterval(this.timmer)
				router.replace({path:"/wechatstudent/stucenter"});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		width: 100%;
		height: 100vh;
		overflow: auto;
		>div{
			>img{
				width:100%;
			}
			>.skip{
				position: absolute;
				color:#FFFFFF;
				background: rgba(0,0,0,0.5);
				padding-left:5px;
				padding-right:8px;
				padding-top:2px;
				padding-bottom:2px;
				border-radius: 2px;
				top:46px;
				right:33px;
			}
		}
	}
</style>
